/**
 * 查询商品列表
 * @param {*} body
 * @returns
 */
export const useLoadGoodsList = (body) => {
    return useHttpPost("/goods/getGoodsList",{body})
}


/**
 * 根据ID获取商品列表
 * @param {*} id
 * @returns
 */
export const useGetGoodsById = (id) => {
    return useHttpPost("/goods/get/"+id,{})
}


/**
 * 新增商品
 * @param {*} body
 * @returns
 */
export const useSaveGoods = (body) => {
    return useHttpPost("/goods/add",{body})
}


/**
 * 修改商品
 * @param {*} body
 * @returns
 */
export const useUpdateGoods = (body) => {
    return useHttpPost("/goods/update",{body})
}


/**
 * 删除商品
 * @param {*} id
 * @returns
 */
export const useDeleteGoods = (id) => {
    return useHttpPost("/goods/delete/"+id,{})
}


/**
 * 设置秒杀商品
 * @param {*} id
 * @returns
 */
export const useToSeckillGoods = (id) => {
    return useHttpPost("/goods/toSeckillGoods/"+id,{})
}


/**
 * 获取秒杀商品列表数据
 * @param {*} body
 * @returns
 */
export const useLoadSeckillGoodsList = (body) => {
    return useHttpPost("/seckillGoods/getSeckillGoodsList",{body})
}


/**
 * 根据id查询秒杀商品
 * @param {*} id
 * @returns
 */
export const useGetSeckillGoodsById = (id) => {
    return useHttpPost("/seckillGoods/get/"+id,{})
}

/**
 * 删除商品
 * @param {*} id
 * @returns
 */
export const useDeleteSeckillGoods = (id) => {
    return useHttpPost("/seckillGoods/delete/"+id,{})
}


/**
 * 修改秒杀商品
 * @param {*} body
 * @returns
 */
export const useUpdateSeckillGoods = (body) => {
    return useHttpPost("/seckillGoods/update",{body})
}

/**
 * 修改状态
 * @param {*} id
 * @returns
 */
export const useUpdateStatusGoods = (body) => {
    body.field  = C2B( body.field)
    return useHttpPost("/goods/update/status",{body})
}


/**
 * 修改秒杀状态
 * @param {*} id
 * @returns
 */
export const useUpdateStatusSeckillGoods = (body) => {
    body.field  = C2B( body.field)
    return useHttpPost("/seckillGoods/update/status",{body})
}
